﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using PersonalWebSite.Common;
using System.Drawing;
using System.Drawing.Imaging;

namespace PersonalWebSite.Controllers
{
    public class LinksController : BaseController
    {
        [HttpPost]
        public ActionResult TakeScreenShot(string url)
        {
            string path = Server.MapPath("~/test/website.png");

            LinksManager.TakeScreenshot(url, new Size(800, 600), b => {
                b.Save(path, ImageFormat.Png);
            });

            return Json(new object { });
        }

    }
}
